package com.cloud.order.mapper.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* 用户操作日志表(Log) 实体类
*
* @author zhangxun
* @since 2020-08-24
*/
@Data
@TableName(value = "log")
public class Log implements Serializable {
    private static final long serialVersionUID=1L;
    /*** 日志ID*/
    @TableId(type = IdType.AUTO)
    private Long id;

    /*** 操作用户*/
    @TableField("username")
    private String username;

    /*** 操作内容*/
    @TableField("operation")
    private String operation;

    /*** 耗时*/
    @TableField("time")
    private Integer time;

    /*** 操作方法*/
    @TableField("method")
    private String method;

    /*** 方法参数*/
    @TableField("params")
    private String params;

    /*** 操作者IP*/
    @TableField("ip")
    private String ip;

    /*** 创建时间*/
    @TableField("create_time")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /*** 操作地点*/
    @TableField("location")
    private String location;

}